# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Eric Bélanger <eric@archlinux.org>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>

pkgname=geeqie
pkgver=2.0.1
pkgrel=5
pkgdesc='Lightweight image viewer'
arch=('x86_64')
url="http://www.geeqie.org/"
license=('GPL2')
# https://github.com/BestImageViewer/geeqie#optional-libraries
depends=('exiv2' 'gtk3' 'ffmpegthumbnailer'
         'djvulibre' 'libheif' 'libchamplain'
         'poppler-glib' 'libarchive' 'libraw' 'lua53'
         'libjxl' 'gspell')
makedepends=('meson'
             'intltool' 'python' 'librsvg'
             'vim'
             'libwmf' 'libwebp' 'imagemagick'
             'fbida' 'gawk' 'perl-image-exiftool'
             # for the docs
             'doxygen' 'yelp-tools' 'graphviz'
)
optdepends=('librsvg: SVG rendering'
            'fbida: for jpeg rotation'
            'gawk: to use the geo-decode function'
            'perl-image-exiftool: for the jpeg extraction plugin'
            'gphoto2: command-line tools for various (plugin) operations'
            'imagemagick: command-line tools for various (plugin) operations')
source=(#"http://www.geeqie.org/${pkgname}-${pkgver}.tar.xz"{,.asc}
        https://github.com/BestImageViewer/geeqie/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz{,.asc}
)
sha256sums=('89c1a7574cfe3888972d10723f4cf3a277249bea494fd9c630aa8d0df944555d'
            'SKIP')
validpgpkeys=('91EC400226201276E2ADCEC7D0DA6F44C936D1DA') # "Colin Clark <colin.clark@cclark.uk>"

# main repo: http://www.geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git
# bug tracker: https://github.com/BestImageViewer/geeqie/issues

build() {
  arch-meson $pkgname-$pkgver build
  meson compile -C build
}

check() {
  meson test -C build
}

package(){
  DESTDIR="$pkgdir" meson install -C build
}
